package com.settlement.system.mapper;

import com.settlement.system.model.entity.common.TblRrOtherCapitalDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 收退款-其他货币资金日记账 Mapper 接口
 *
 * @author Ximi
 * @since 2020-07-14
 */
public interface TblRrOtherCapitalDetailMapper extends BaseMapper {

    /**
     * check whether already exist begin-balace
     *
     * @param param 核算店铺编码
     * @return return true if exist begin-balace otherwise return false
     */
    public Boolean isExistBeginBalace(TblRrOtherCapitalDetail param);

    /**
     * 检测期初是否合法
     *
     * @param param
     * @return
     */
    public String getLeastCapitalMonth(TblRrOtherCapitalDetail param);

    /**
     * 获取最小的期初余额月份呢
     *
     * @param param 核算店铺编码
     * @return
     */
    public String getLeastBeginBalaceCapitalMonth(TblRrOtherCapitalDetail param);

    /**
     * 是否存在记录
     *
     * @param param
     * @return
     */
    public Boolean isExist(TblRrOtherCapitalDetail param);

    /**
     * 更新期初
     *
     * @param param
     */
    public void updateBeginBalance(TblRrOtherCapitalDetail param);

    /**
     * 更新页面余额
     * @param param
     */
    public void upatePageRemainAmount(TblRrOtherCapitalDetail param);

    /**
     * 获取列表
     *
     * @param ncVirtualAccounts
     * @return
     */
    public List<TblRrOtherCapitalDetail> getList(@Param("ncVirtualAccounts") List<String> ncVirtualAccounts);

    TblRrOtherCapitalDetail getFoot(@Param("params") Map<String, Object> params);
}

